/*
 * @Author: funlee
 * @Email: i@funlee.cn
 * @Date: 2018-06-22 09:31:56
 * @Description: 基础例子 
 */
import React, { Component } from 'react';
import G6 from '@antv/g6';

export default class App extends Component {
  componentDidMount() {
    const data = {
      nodes: [{
        id: 'node1',
        x: 100,
        y: 200
      }, {
        id: 'node2',
        x: 300,
        y: 200
      }],
      edges: [{
        id: 'edge1',
        target: 'node2',
        source: 'node1'
      }]
    };

    const graph = new G6.Graph({
      container: 'mountNode',
      width: 600,
      height: 600
    })

    graph.read(data)
  }
  render() {
    return (
      <div id="mountNode">

      </div>
    )
  }
}
